package com.fhs.demo.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import com.fhs.demo.vo.UserVO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Student1 implements TransPojo {

    private Map<String,Object> transMap = new HashMap<>();

    private static final Long version = 1L;

    private final Long xx = 1l;

    @TableId
    private String id;

//    @Trans(type = TransType.SIMPLE,  target = UserMp.class,fields={"name","age"},ref = "userName",sort = 1)
    private List<String> userIds;

    private String userName;


    private String userId;

//    private List<UserMp> user;

    @Trans(type = TransType.MULTIPLE,  target = UserMp.class,uniqueFields = {"userId","idNo"},readFields = {"userId3","idNo1"},fields = {"age","name"},ref = "userVo",sort = 2) // refs = {"user3Age","user3Name"}
    private String userId4;

    private String userId3;

    private UserMp userVo;

    private Integer user3Age;

    private String user3Name;

    private String idNo1;

}
